let api = {
  getLocation() {
     return new Promise((resolve, reject)=> {
          wx.getLocation({})
       resolve()
     })

  
  },
}
export default {
  //作为组件库(install)并自定义组件库名称
  install: function(Vue, name = "$common") {
    //将组件库挂载在原型对象上
    Object.defineProperty(Vue.prototype, name, {
      value: api
    });
  }
  }